<!--
 * @Description:处理按钮组组件
 * @Version: 2.0
 * @Autor: kafei
 * @Date: 2021-11-29 15:13:04
 * @LastEditors: kafei
 * @LastEditTime: 2021-12-01 11:09:45
-->
<template>
  <div class="buttonConfig">
    <el-button
      v-for="item in buttonData"
      :key="item.text"
      size="small"
      v-bind="item"
      @click="handClick(item)"
    >
      {{ item.text }}
    </el-button>
  </div>
</template>

<script>
export default {
  name: 'ButtonConfig',
  props: {
    row: {
      type: Object,
      default: () => {
        return {}
      }
    },
    buttonData: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  methods: {
    handClick (item) {
    //   item.fn && item.fn()
      this.$emit('click', item, this.row)
    }
  }
}
</script>

<style>

</style>
